package com.ming.dancing.springboot.service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ming.dancing.springboot.Dao.CourseDao;
import com.ming.dancing.springboot.entity.Course;

import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


import java.util.List;

@Service
@Transactional
public class CourseServiceImpl implements CourseService {

    @Autowired
    CourseDao courseDao;
    @Override
    //查询所有
    public List<Course> findAll() {
        return courseDao.findAll();
    }

    @Override
    public void save(Course course) {
        courseDao.save(course);
    }

    @Override
    public void delete(Integer id) {
        courseDao.delete(id);
    }

    @Override
    public Course find(Integer id) {
        return courseDao.find(id);
    }

    @Override
    public void update(Course course) {
        courseDao.update(course);
    }

    @Override
    public List<Course> getcourselistbyid(Integer dancerid) {
        return courseDao.getcourselistbyid(dancerid);
    }




}
